import http from '@/utils/http'

/**
 * 获取菜单列表
 * @returns
 */
export const getListApi = async() => {
  return await http.get('/api/menu/list', null)
}

/**
 * 新增菜单列表
 * @returns
 */
export const addMenuApi = async(param) => {
  return await http.post('/api/menu', param)
}
/**
 * 编辑菜单列表
 * @returns
 */
export const editMenuApi = async(param) => {
  return await http.put('/api/menu', param)
}
/**
 * 删除菜单
 * @returns
 */
export const deleteMenuApi = async(param) => {
  return await http.delete('/api/menu', param)
}
/**
 * 获取上级菜单列表
 * @returns
 */
export const getParentListApi = async() => {
  return await http.get('/api/menu/parent', null)
}
/**
 * 获取单数据
 * @returns
 */
export const getMenuListApi = async(param) => {
  return await http.get('/api/login/getMenuList', param)
}

